package com.oxygen.design.memento.bean;

/**
 * @author wangjie
 * @title: Originator
 * @description: TODO
 * @date 2022/3/30 21:50
 **/
public class Originator {
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento saveStateToMemento() {
        return new Memento(state);
    }

    public void getStateFromMemento(Memento Memento) {
        state = Memento.getState();
    }
}
